﻿package{
	import shapes.Box;
	public class rocket extends Box{
		
		public function rocket(){
			addFrameScript(totalFrames-1, die);
			//and on contact
		}
		public override function create():void {
			applyGravity = true;
			//groupIndex=-1;
			angularVelocity = Math.random()*10 - 5;
			super.create();
			
		}
		
		private function die(){
			stop();
			addFrameScript(totalFrames-1, null);
			if(parent){
				parent.removeChild(this);
			}
		}
	}
}